<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>媒体查询</title>

    <style>
        @media only screen and (min-width: 100px) and (max-width: 640px){
            div{
                height: 200px;
                width: 200px;
                background: yellow;
                border: 1px solid red;
            }
        }

        @media only screen and (min-width: 640px) and (max-width: 1280px){
            div{
                height: 400px;
                width: 400px;
                background: palevioletred;
                border: 1px solid red;
            }
        }

        @media only screen and (min-width: 1280px) and (max-width: 2560px){
            div{
                height: 800px;
                width: 800px;
                background: brown;
                border: 1px solid red;
            }
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>